﻿<!DOCTYPE html>
@*单栏式页面*@
@{
    if (false)
    {
        <script src="~/LiberUI/Scripts/jquery.js"></script>
        <script src="~/LiberUI/Scripts/jquery.ba-resize.js"></script>
        <script src="~/LiberUI/Scripts/LiberUI.Base.js"></script>
        <script src="~/LiberUI/Scripts/LiberUI.Controllers.js"></script>
        <script src="~/LiberUI/Scripts/LiberUI.Action.js"></script>
    }

}
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>SoProject项目管理平台</title>
    @System.Web.Optimization.Styles.Render("~/cssBase")
    @System.Web.Optimization.Scripts.Render("~/jsBase")
    <link href="~/SiteUI/Base.css" rel="stylesheet" />
    <link href="~/SiteUI/indexBase1.css" rel="stylesheet" />
</head>
<body>
    @*定义一个容纳当前页面各种UI部件和数据的环境变量*@
    <script>
        Env = {};
    </script>
    <div id="Wnd">
        <div id="page">
            <div id="HeadCnt">
                <div class="LeftWraper">
                    <a id="SiteLogo" href="#">SoProject如此项目管理</a>
                </div>
                @RenderSection("HeadCnt",false)
            </div>
            <div id="HeadBar">
                @RenderSection("HeadBar",false)
                <div id="UserBar">
                    <div id="Avata">您好！@ViewBag.UserName</div>
                    <div id="MyMessage">消息</div>
                    <div id="MyAlert">提醒</div>
                </div>
            </div>
            <div id="BodyPanel">
                @RenderBody()
            </div>
            <div id="PageHelper">
                <a id="GoTop" class="hideOut"></a>
                @RenderSection("PageHelper",false)
            </div>
            <div id="pageFoot" class="floatClear"></div>
        </div>
    </div>

    <div id="SiteNaviBar">
        <div id="toMiddle">
            <a id="siteHome" href="/Issue/Index">
                <h4>SoProject</h4>
            </a>
            <div id="NaviItems">
                <div id="Start" class="NaviLv1">发现</div>
                <div id="WorkMgr" class="NaviLv1" subitems="subWorkMgr">事务</div>
                <div id="ProjectMgr" class="NaviLv1" subitems="subProjectMgr">项目</div>
                <div id="SystemMgr" class="NaviLv1" subitems="subSystem">系统</div>
                @*承载二级菜单的动态面板*@
                <div id="NaviLv2Panel"></div>
            </div>
        </div>
    </div>

    <div id="subWorkMgr" style="display:none">
        <a class="subitem" href="/Issue/Index">
            <h4>事项</h4>
            <h5>由各方面反馈的待处理问题</h5>
        </a>
        <a class="subitem" href="/Task/Index">
            <h4>任务</h4>
            <h5>可指派到某个责任人的具体工作</h5>
        </a>
        <a class="subitem" href="/WorkReport/Index">
            <h4>工作汇报</h4>
            <h5>总结提炼每阶段工作内容和成果</h5>
        </a>
    </div>
    <div id="subProjectMgr" style="display:none">
        <a class="subitem" href="/Project/Index">
            <h4>项目</h4>
            <h5>列示项目概况和相关业务信息</h5>
        </a>
        <a class="subitem" href="/Issue/Index">
            <h4>计划</h4>
            <h5>各项目下预订工作计划和规划</h5>
        </a>
        <a class="subitem" href="/Issue/Index">
            <h4>知识库</h4>
            <h5>各项目下预订工作计划和规划</h5>
        </a>
    </div>
    <div id="subSystem">
        <a class="subitem" href="/Project/Index">
            <h4>组织架构</h4>
            <h5>管理团队中的岗位架构</h5>
        </a>
        <a class="subitem" href="/System/Options">
            <h4>业务选项</h4>
            <h5>管理业务数据中的预定义选项</h5>
        </a>
        <a class="subitem" href="/Issue/Index">
            <h4>我的配置</h4>
            <h5>管理专用于您的定制选项</h5>
        </a>
    </div>

    <script>
        function closeNavi() {
            $(this).removeClass('Expand');
            $("#NaviItems>.active").removeClass("active");
            $("#NaviLv2Panel").removeClass('active').hide();
        };

        function expandNaviItem() {
            var $item = $(this);
            $item.siblings(".active").removeClass("active");
            $item.addClass('active');
            $("#NaviLv2Panel").addClass("active").show();
            
            var sub = $(this).attr("subItems");
            if (!ObjHelper.IsEmpty(sub)) {
                $("#SiteNaviBar").addClass('Expand').focus();
                $("#NaviLv2Panel").children().hide();
                $("#NaviLv2Panel").append($("#" + sub).show());
            }
            else {
                $("#SiteNaviBar").removeClass('Expand');
                $("#NaviLv2Panel").children().hide();
                $("#NaviLv2Panel").removeClass('active');
            }
        };

        function fixIt(ev) {
            if (this.Offset().top >= Env.DyHeight) {
                //当Position改为fixed需要加上右侧滚动条的宽度
                Env.HeadBar.css('top', '0px').css('position', 'fixed').css('paddingRight','14px');
                if (Env.GoTop.hasClass("hideOut")) {
                    Env.GoTop.removeClass("hideOut").addClass("hideIn");
                }
            }
            else {
                Env.HeadBar.css('position', '').css('top', '').css('paddingRight','');
                if (Env.GoTop.hasClass("hideIn")) {
                    Env.GoTop.removeClass("hideIn").addClass("hideOut");
                }
            }
        };

        $(function () {
            $.ajaxSetup({ global: true });
            $("#SiteNaviBar").on('mouseleave', closeNavi);
            $(".NaviLv1").on('mouseenter', expandNaviItem);

            //计算页面头部各种布局数据，实现页面头部及左侧区域的悬浮效果
            Env.DyHeight = $("#HeadCnt").height();
            Env.HeadBar = $("#HeadBar");

            //创建滚动条控件
            Env.scl = new Scroller($('#page'));
            Env.scl.on('scrolling', fixIt);

            //创建GoTop按钮
            Env.GoTop = $("#GoTop").click(function () { Env.scl.val({ 'ScrollTop': 0 }); });

        })
    </script>
</body>
</html>
